package com.huawei.appgallery.forum.forum.forumletters.view;

import android.app.ActionBar;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.Nullable;
import com.huawei.appgallery.forum.base.ui.ForumActivity;
import com.huawei.appgallery.forum.forum.api.IForumLetterActivityProtocol;
import com.huawei.hmf.annotation.ActivityDefine;
import o.azb;
import o.bsm;
import o.bue.e;
import o.bun.a;
import o.bun.c;
import o.bun.d;
import o.bzx;
import o.cgv;
import o.evx;
import o.fho;
import o.fiu;
import o.fiv;
import o.fjb;
import o.fjm;
import o.FragmentTransaction;

@ActivityDefine(alias = "forum.letters", protocol = IForumLetterActivityProtocol.class)
public class ForumLetterActivity extends ForumActivity implements bsm {
    private View ʻॱ;
    private IForumLetterActivityProtocol ˋॱ;
    private fiv ͺ = fiv.ॱ(this);
    private String ॱˊ;
    private String ॱˋ;
    private TextView ॱˎ;
    private View ᐝॱ;

    public void onCreate(@Nullable Bundle bundle) {
        super.onCreate(bundle);
        cgv.ˋ(this, a.ˊ, a.ॱ);
        setContentView(d.ʽ);
        this.ˋॱ = (IForumLetterActivityProtocol) this.ͺ.ॱ();
        if (this.ˋॱ != null) {
            this.ॱˊ = this.ˋॱ.getUri();
            this.ॱˋ = this.ˋॱ.getTitle();
        } else {
            finish();
        }
        ͺ();
        ᐝ();
    }

    private void ᐝ() {
        fjb ˎ = fho.ˏ().ˋ("Forum").ˎ("forum_letter_frg");
        ((IForumLetterFrgProtocol) ˎ.ˊ()).setUri(this.ॱˊ);
        fjm ˏ = fjm.ˏ(fiu.ˊ().ˋ(this, ˎ));
        FragmentTransaction ˊ = ˏॱ().ˊ();
        ˊ.ˏ(c.ʽ, ˏ.ˏ(), "forum_letter");
        ˊ.ˏ();
    }

    private void ͺ() {
        ActionBar actionBar = getActionBar();
        if (actionBar != null) {
            actionBar.hide();
        }
        azb.ˏ(findViewById(e.ˏˎ));
        this.ॱˎ = (TextView) findViewById(c.ꓸ);
        this.ᐝॱ = findViewById(c.ʼ);
        this.ᐝॱ.setOnClickListener(new evx(this) {
            final /* synthetic */ ForumLetterActivity ˎ;

            {
                this.ˎ = r1;
            }

            public void ˋ(View view) {
                this.ˎ.onBackPressed();
            }
        });
        this.ʻॱ = findViewById(c.ॱʽ);
        this.ʻॱ.setOnClickListener(new evx(this) {
            final /* synthetic */ ForumLetterActivity ˊ;

            {
                this.ˊ = r1;
            }

            public void ˋ(View view) {
                this.ˊ.ॱˊ();
            }
        });
    }

    private void ॱˊ() {
        ((bzx) fho.ˏ().ˋ("ForumSearch").ॱ(bzx.class)).ॱ(this, false);
    }

    public void ˏ(String str) {
        this.ॱˎ.setText(str);
    }
}
